import HTTP from "@/utils/http";
const base = "/manage";
// 管理系统路由菜单
export const MenuList = (params) => HTTP.get(`user/GetAdminRouterList`, { params });
// 注销列表
export const LogoffList = (params) => HTTP.get(`${base}/LogoffList`, { params });
// 同意注销
export const AgreeLogoff = (data) => HTTP.post(`${base}/AgreeLogoff`, data);
// 拒绝注销
export const RefuseLogoff = (data) => HTTP.post(`${base}/RefuseLogoff`, data);
// 认证列表
export const RealList = (params) => HTTP.get(`${base}/RealList`, { params });
// 拒绝认证
export const RefuseReal = (data) => HTTP.post(`${base}/RefuseReal`, data);
// 通过认证
export const PassReal = (data) => HTTP.post(`${base}/PassReal`, data);
// 重置认证
export const resetReal = (data) => HTTP.post(`${base}/resetReal`, data);
// 获取认证信息
export const realInfo = (params) => HTTP.get(`${base}/realInfo`, { params });
// 禁止认证
export const ProhibitReal = (data) => HTTP.post(`${base}/ProhibitReal`, data);
// 恢复认证
export const CancelProhibitReal = (data) => HTTP.post(`${base}/CancelProhibitReal`, data);
// 添加用户
export const addUser = (data) => HTTP.post(`${base}/addUser`, data);
// 用户列表
export const userList = (params) => HTTP.get(`${base}/list`, { params });

// 用户基本信息
export const userInfo = (params) => HTTP.get(`${base}/info`, { params });
// 用户认证信息
export const RealInfo = (params) => HTTP.get(`${base}/realinfo`, { params });
// 修改认证信息
export const UpdateRealInfo = (data) => HTTP.post(`${base}/UpdateRealInfo`, data);
// 重置认证信息
export const ResetReal = (data) => HTTP.post(`${base}/resetReal`, data);
// 临时/正式转换

// 设置/取消超级管理员
export const SetSuperUser = (data) => HTTP.post(`${base}/SetSuperUser`, data);

// 登出用户
export const logout = (data) => HTTP.post(`${base}/logout`, data);
// 修改用户资料
export const update = (data) => HTTP.post(`${base}/update`, data);
// 删除用户
export const remove = (data) => HTTP.post("/manage/remove", data);
// 限制用户登录
export const restrictLogin = (data) => HTTP.post(`${base}/restrictLogin`, data);
// 取消限制登录
export const cancelRestrictLogin = (data) =>
  HTTP.post(`${base}/cancelRestrictLogin`, data);
// 修改用户角色
export const changeRole = (data) => HTTP.post("/manage/changeRole", data);
// 重置用户密码
export const resetPassword = (data) => HTTP.post("/manage/resetPassword", data);

// 黑名单用户列表
export const BlackList = (params) => HTTP.get(`${base}/Blacklist`, { params });
// 拉入黑名单
export const ToBlack = (data) => HTTP.post(`${base}/ToBlack`, data);
// 取消黑名单
export const CancelBlack = (data) => HTTP.post(`${base}/CancelBlack`, data);
// 获取用户token列表
export const getUserTokenList = (params) =>
  HTTP.get(`${base}/getUserTokenList`, { params });
// 删除用户token列表
export const removeUserToken = (data) =>
  HTTP.post(`${base}/removeUserToken`, data);
// 清空用户token列表
export const emptyUserToken = (data) =>
  HTTP.post(`${base}/emptyUserToken`, data);

// 获取用户行为日志
export const getUserActiveList = (params) =>
  HTTP.get(`${base}/getUserActiveList`, { params });
// 删除用户行为日志
export const removeUserActive = (data) =>
  HTTP.post(`${base}/removeUserActive`, data);
// 清空用户行为日志
export const emptyUserActive = (data) =>
  HTTP.post(`${base}/emptyUserActive`, data);

// 获取用户下线列表
export const getUserInviterList = (params) =>
  HTTP.get(`${base}/getUserInviterList`, { params });

// 获取用户地址库
export const userAddressList = (params) =>
  HTTP.get(`${base}/userAddressList`, { params });
// 删除用户地址库
export const removeUserAddress = (data) =>
  HTTP.post(`${base}/removeUserAddress`, data);
// 修改用户地址库
export const updateUserAddress = (data) =>
  HTTP.post(`${base}/updateUserAddress`, data);
// 清空用户地址库
export const emptyUserAddress = (data) =>
  HTTP.post(`${base}/emptyUserAddress`, data);

// 用户设备列表
export const GetUserDeviceList = params => HTTP.get(`${base}/GetUserDeviceList`, { params })

// 锁定用户
export const LockUser = (data) => HTTP.post(`${base}/LockUser`, data)



export default {
GetUserDeviceList,
  MenuList,
  addUser,
  userList,
  userInfo,
  update,
  remove,
  restrictLogin,
  cancelRestrictLogin,
  BlackList,
  ToBlack,
  CancelBlack,
  getUserTokenList,
  removeUserToken,
  emptyUserToken,
  getUserActiveList,
  removeUserActive,
  emptyUserActive,
  userAddressList,
  removeUserAddress,
  updateUserAddress,
  emptyUserAddress,
  changeRole,
  resetPassword,
  RealList,
  RefuseReal,
  PassReal,
  resetReal,
  realInfo,
  LogoffList,
  LockUser
};
